<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  var arr = ['5月','4月','3月','2月','1月'];
  function myFun(arr){
    for(var i=0;i<arr.length/2;i++){
      var index = arr.length -1;
      var temp = arr[i];
      arr[i] = arr[index - i];
      arr[index - i] = temp;
    }
    return arr
  }
  console.log(myFun(arr));
</script>
</html>